package utils;

import java.awt.Color;
import java.util.Random;

/**
 * Provides some color choices for rendering webpages
 * 
 * @author j55wu
 * 
 */
public class FontColor {

	// private Color color;
	//
	// public FontColor(int r, int g, int b){
	// this.color = new Color(r, g, b);
	// }
	public static String randomDarkRedColorCode() {
		Random rd = new Random();
		return HTMLColor(new Color(rd.nextInt(50) + 206, rd.nextInt(80),
				rd.nextInt(80)));
	}

	public static String randomDarkGreenColorCode() {
		Random rd = new Random();
		return HTMLColor(new Color(rd.nextInt(50), rd.nextInt(30) + 226,
				rd.nextInt(50)));
	}

	public static String randomLightBlueColorCode() {
		Random rd = new Random();
		return HTMLColor(new Color(rd.nextInt(20), rd.nextInt(50) + 100,
				rd.nextInt(30) + 226));
	}

	public static String randomVioletColorCode() {
		Random rd = new Random();
		return HTMLColor(new Color(rd.nextInt(30) + 150, rd.nextInt(20),
				rd.nextInt(30) + 150));
	}

	public static String randomDarkBlueColorCode() {
		Random rd = new Random();
		return HTMLColor(new Color(rd.nextInt(50), rd.nextInt(50),
				rd.nextInt(30) + 226));
	}

	public static String randomColorCode() {
		Random rd = new Random();
		return HTMLColor(new Color(rd.nextInt(256), rd.nextInt(256),
				rd.nextInt(256)));
	}

	private static String HTMLColor(Color color) {
		return "#"
				+ Integer.toHexString(color.getRGB()).substring(2)
						.toUpperCase();
	}

}
